#pragma once
#include <comLib\global.h>
extern "C" {
#include<libavcodec\avcodec.h>
#include <libswscale/swscale.h>
#include <libavutil/imgutils.h>
#include <libavformat\avformat.h>
}

class RPCFW_EXPORT DDesktopDecoder
{
public:
	DDesktopDecoder(AVFormatContext *pFormatCtx_Video);
	~DDesktopDecoder();
	int getWidth();
	int getHeight();
	int decode_frame(AVPacket *pPacket);

private:
	AVCodecContext *m_pCodecContext;
	AVPacket *m_pPkt;
	AVFrame *m_pFrame;
	SwsContext *m_pImg_convert_ctx;
};

